/* --------------------------------------------------------
 * Copyright (c) aeky , Inc.  All rights reserved.
 * --------------------------------------------------------
 */
package com.aeky.server.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.aeky.domain.Department;
import com.aeky.server.dao.IDepartmentDao;

/**
 * TODO
 * 
 * @author aeky
 */
@Repository("departmentDao")
public class DepartmentDaoImpl extends BaseDaoSupport<Department> implements IDepartmentDao {

    /*
     * (non-Javadoc)
     * 
     * @see com.aeky.server.dao.IDepartmentDao#getAllDeptTest()
     */
    @Override
    public List<Department> getAllDeptTest() {
        List<Department> deptList = (List<Department>) this.getEntityManager()
                .createQuery("from Department d where d.deptParentId = 0 and d.isValid = 1").getResultList();
        return deptList;
    }
}
